@echo off

if exist %JAVA_HOME%\bin\java.exe goto JAVA_HOME_SET

#set your JAVA_HOME accordingly
set JAVA_HOME=C:\programme\jdk150
if exist %JAVA_HOME%\bin\java.exe goto JAVA_HOME_SET

echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ! Error: JAVA_HOME not found                                             !
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause
goto END

:JAVA_HOME_SET

if exist gps.jar goto JAR_AVAILABLE

echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ! Error: gps.jar not found. Place it right next to this file             !
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause
goto END

:JAR_AVAILABLE

%JAVA_HOME%\bin\java.exe -cp .;gps.jar de.fhluebeck.oop.gps.cmd.Command %*